home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 028a / unzipem.zip / UNZ.BLD < prev    next >
Text File  |  1992-01-03  |  4KB  |  148 lines

  1. 'cur.bld version of unz.bld, to control the mouse cursor
  2. 'UNZ.BLD , an unzipper to use at pcshell command line.
  3. File Ziplist
  4. String ZipName
  5. Integer FirstCycle, Recycle
  6.  
  7. FirstCycle := 0
  8. don't use the cursor
  9. cls
  10. if not exist "*.ZIP" ThereAreNone
  11. FirstScreen
  12. run dir *.ZIP | Sort > ZIPS.TMP
  13. :FLASHBACK
  14. Recycle := 0
  15. DrawtheBoxes
  16. open "ZIPS.TMP" for reading as Ziplist
  17. while not eof Ziplist
  18.   ReadLine ZipName from Ziplist
  19.   if (ZipName contains " ZIP")
  20.     Put UpperCase ZipName into ZipName                    
  21.     Put Trim ZipName into ZipName                         
  22.     ZipName := MidStr ZipName,1,8
  23.     ShowTheName
  24.   end
  25. end
  26. CloseAllFiles
  27. WannaGoAgain
  28. if Recycle == 5 goto FLASHBACK
  29.  
  30. GetOut
  31. 'program ends on line above
  32.  
  33. sub DrawtheBoxes
  34.   if FirstCycle == 1 goto JUMPOVER
  35.   cls
  36.   HelpText
  37.   Text bright white on blue                                        
  38.   double box 4,    20,    40,    10 bright white on blue
  39.   'co-ordinates for OK box                                         
  40.   single box 10, 22, 6, 3 bright white on blue
  41.   'for NEXT box                                                    
  42.   single box 10, 35, 8, 3 bright white on blue
  43. 'line below is for "Exit" box                                      
  44.   single box 10,50,8,3 bright white on blue
  45.   Say @  7, 23 "Do you want to unzip ";
  46. :JUMPOVER
  47. end
  48.  
  49. sub LowHelpBox
  50.   Single Box 16,10,56,10 white on white
  51.   Single Box 15,11,56,10 black on green
  52. end                                         
  53.  
  54. sub HelpText
  55.   LowHelpBox
  56.   Text black on green
  57.   say @ 16,13 "~"~OK~"~ unzips the highlighted file, then exits."
  58.   say @ 17,13 "~"~NEXT~"~ shows the name of the next zip file."
  59.   say @ 19,13 "Move the highlight from box to box with the spacebar"
  60.   say @ 20,13 "or with the left and right arrow keys, then"
  61.   say @ 21,13 "press Return to choose the highlighted action."
  62. end
  63.  
  64. sub WannaGoAgain
  65.   cls
  66.   Text bright white on blue
  67.   double box 6,    20,    40,    10 bright white on blue     
  68.   'co-ordinates for OK box
  69.   single box 11, 28, 6, 3 bright white on blue
  70.   'for EXIT box
  71.   single box 11, 39, 9, 3 bright white on blue
  72.   Say @ 7,22 "You have seen all the ZIP files."
  73.   say @ 8,22 "Choose OK to see the list again."
  74.   Popup                                   
  75.     Highlight @ 12,   29,   4
  76.     item " OK "                           
  77.       Recycle := 5
  78.       FirstCycle := 0
  79.  
  80.     Highlight @ 12,   40,   6
  81.     item " EXIT "
  82.       GetOut
  83.    end
  84. end
  85.  
  86. sub ThereAreNone
  87.   help2box
  88.   text black on white
  89.   say @ 10,12 "Sorry, we looked and couldn't find any ZIP files."
  90.   say @ 14,12 "Press any key to exit."
  91.   pause
  92.   GetOut
  93. end
  94.  
  95. sub GetOut
  96.   cls
  97.   CloseAllFiles
  98.   if exist "ZIPS.TMP" run del ZIPS.TMP
  99.   use cursor
  100.   exit
  101. end
  102.  
  103. sub help2box                                
  104.    Don't use the cursor                     
  105.    cls black on cyan                        
  106.    Double Box 1,1,80,24 black on cyan       
  107.    Single box  9,10,56,10 black on black    
  108.    Single box 8,9,56,10 black on white
  109. end
  110.  
  111. sub FirstScreen
  112.   help2box
  113.   text black on white
  114.   say @10,12 "This is UNZIPEM, a front end for PKUNZIP."
  115.   say @12,12 "Choose a file to unzip."
  116.   say @16,12 "Alfred L. Wallace            Milwaukee, Wisconsin"
  117. end
  118.  
  119. sub ShowTheName
  120.   Put Trim ZipName into ZipName
  121.   Text blue on blue
  122.   Say @ 7,44 "             "
  123.   Text black on white
  124.   Say @ 7,44 ZipName;
  125.   Say ".ZIP?"
  126.   Text bright white on blue
  127.   MouseHideCursor
  128.   Popup
  129.     Highlight @ 11,   23,   4
  130.     item " OK "
  131.       cls
  132.       System "Pkunzip " + ZipName
  133.       sleep 60 ticks
  134.       GetOut
  135.  
  136.     Highlight @ 11,   36,   6
  137.     item " NEXT "
  138.  
  139.  
  140.     Highlight @11,51,6
  141.     item " EXIT "
  142.       GetOut
  143.   end
  144. FirstCycle := 1
  145. end
  146.  
  147.  
  148.